﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using ModuleEditPlace.ViewModels;

namespace ModuleEditPlace.Commands
{
    public class DeletePlaceCommand : ICommand
    {
        private IEditPlaceViewModel m_editPlaceViewModel;

        public DeletePlaceCommand(IEditPlaceViewModel editPlaceViewModel)
        {
            m_editPlaceViewModel = editPlaceViewModel;
        }        

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            m_editPlaceViewModel.DeletePlace(); 
        }
    }
}
